#include <iostream>

using namespace std;

void connect(char*a,char*b,int n);
int length(char *a);


int main()
{
    char a[80],b[80];
    int l, n;

    cout<<"enter the char a,b"<<endl;
    cin>>a>>b;
    cout<<"enter thr connect postion"<<endl;
    cin>>n;

    l=length(a);
    if(l>n) 
    {
        cout<<l<<"the postion is not fit"<<endl;
        cin>>n;
        return 0;
    }
         
    connect(a,b,n);

    cout<<a;
    

    cin>>a;
    return 0;
}

int length(char *a)
{
    int n=0;
    while(*a+n!='\0') n++;
    return n;
}


void connect(char *a,char *b,int n)
{
    while(*b!='\0')
    {
        *(a+n)=*b;
        b++;
        n++;
    }
    *(a+n)='\0';
}



